package com.qys.livesMall.app.user.model.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 用户充值
 * </p>
 *
 * @author dp
 * @since 2023-04-27
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("h2_app_user_recharge_withdrawals")
@Schema(name = "H2AppUserRecharge对象", description = "用户充值")
public class H2AppUserRechargeWithdrawals implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @TableId("id")
    private String id;

    @Schema(description = "用户id")
    @TableField("user_id")
    private String userId;

    @Schema(description = "用户名")
    @TableField("user_name")
    private String userName;

    @Schema(description = "充值类型(0金额)")
    @TableField("recharge_type")
    private Byte rechargeType;

    @Schema(description = "打款方式(0银行卡,1usdt,2BIT)")
    @TableField("payment_method")
    private Byte paymentMethod;

    @Schema(description = "来源(0第三方充值)")
    @TableField("source")
    private Byte source;

    @Schema(description = "充值金额")
    @TableField("amount")
    private BigDecimal amount;

    @Schema(description = "实际收到金额")
    @TableField("real_amount")
    private BigDecimal realAmount;

    @Schema(description = "汇率国家缩写")
    @TableField("country")
    private String country;

    @Schema(description = "汇率")
    @TableField("exchange_rate")
    private BigDecimal exchangeRate;

    @Schema(description = "汇率金额")
    @TableField("rate_amount")
    private BigDecimal rateAmount;

    @Schema(description = "审核状态(0提交,1已审核,2审核不通过，3:取消)")
    @TableField("audit_type")
    private Byte auditType;

    @Schema(description = "充值人姓名")
    @TableField("recharge_name")
    private String rechargeName;

    @Schema(description = "银行名称")
    @TableField("bank_name")
    private String bankName;

    @Schema(description = "银行卡号")
    @TableField("bank_no")
    private String bankNo;

    @Schema(description = "邮箱")
    @TableField("email")
    private String email;

    @Schema(description = "转账截图")
    @TableField("img")
    private String img;

    @Schema(description = "创建时间")
    @TableField("create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+0")
    private LocalDateTime createTime;

    @Schema(description = "审核时间")
    @TableField("audit_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+0")
    private LocalDateTime auditTime;

    @Schema(description = "银行地址")
    @TableField("bank_address")
    private String bankAddress;

    @Schema(description = "头像")
    @TableField("avatar")
    private String avatar;

    @Schema(description = "用户来源")
    @TableField("user_source")
    private Byte userSource;

    @Schema(description = "审核说明")
    @TableField("remark")
    private String remark;

    @Schema(description = "re:充值,wl:提现")
    @TableField("type")
    private String type;

    @Schema(description = "是否删除")
    @TableField("deleted")
    @JsonIgnore
    private Boolean deleted;


    @Schema(description = "订单号")
    @TableField("order_no")
    private String orderNo;

    @Schema(description = "用户充/提次数")
    @TableField("num")
    private Integer num;

    @Schema(description = "通道id")
    @TableField("channel_id")
    private Integer channelId;

    @Schema(description = "发放状态 0 未发放 1 已发放")
    @TableField("remit_status")
    private Integer remitStatus;

    @Schema(description = "变更前金额")
    private BigDecimal amountBeforeChange;

    @Schema(description = "操作人")
    private String operator;

    @Schema(description = "提现手续费")
    private BigDecimal commission;
}
